package top.lwaiting.mapper;

import org.apache.ibatis.annotations.Select;
import top.lwaiting.domain.Role;

import java.util.List;

/**
 * @author YANG
 * @version V1.0
 * @date 2025/1/7 16:51
 * @see IRoleMapper
 **/
public interface IRoleMapper {

    /**
     * 根据用户Id查询角色信息
     * @param uid {@link Integer}
     * @return {@link List}
     */
    @Select("SELECT * FROM sys_role r, sys_user_role ur WHERE r.id = ur.roleid AND ur.userid = #{uid}")
    public List<Role> findRoleByUid(Integer uid);
}
